package Demo2;
//

class Animal2 {
    int age = 0;
    double weight = 5.0;
}
class Cat2 extends Animal2 {
    double weight = 9.5;
    String color = "Black";
    String name = "花花";
    public void display() {
        String name = "小黑";
        System.out.println(age);    //0
        System.out.println(weight);     //9.5
        System.out.println(color);      //Black
        System.out.println(name);       //小黑
    }
}
public class test2 {
    public static void main(String[] args) {
        Cat2 cat = new Cat2();
        cat.display();
    }
}
